package com.zby.big_event_zby.learnTest;

/**
 * @version 1.0
 * @auther ZBY
 */
public class Thread02 {
    public static void main(String[] args) {
        Dog1 dog1 = new Dog1();
        new Thread(dog1).start();

    }
}
class Dog1 implements Runnable {
    int count = 0;
    @Override
    public void run() {
        while (true){
            System.out.println("小狗汪汪叫"+count+++"线程名"+Thread.currentThread().getName());
            try {
                Thread.sleep(1000);
            }catch (Exception e){
                e.printStackTrace();
            }
            if (count==10){
                break;
            }

        }
    }
}